﻿<Page x:Class="ScoreMS.Views.Examination_paperEdit"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="618"
      xmlns:controls="clr-namespace:ScoreMS.Controls"
	Title="Examination_paperEdit">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="72" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" VerticalAlignment="Center" Text="编辑试卷" TextAlignment="Center" FontSize="24"></TextBlock>

        <Grid Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="61" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="课程：" Margin="5, 0, 0, 0" FontSize="16" Height="23" Name="textBlock1"/>
                <TextBlock Text="xxxx" Height="23" Name="lblCourse" MinWidth="120" FontSize="16"></TextBlock>
                <TextBlock Text="试卷ID：" Margin="40, 0, 0, 0" FontSize="16" Height="23" Name="textBlock2"/>
                <TextBlock Name="lblEx_id" Text="xxxx" FontSize="16" Width="80" Height="23"/>
                <TextBlock Name="lblProblemCur" Text="{Binding ProblemCur}" FontSize="40" Margin="100, 0, 0, 0"/>
                <TextBlock Name="lblProblemCount" Text="/16" FontSize="40"/>
            </StackPanel>
            <Grid Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="390" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid Grid.Column="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="124" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    
                    <TextBlock Text="大题号" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Margin="0, 0, 10, 0" HorizontalAlignment="Right"></TextBlock>
                    <controls:NumericUpDown Grid.Row="0" Grid.Column="1" x:Name="NumBig" Margin="10, 0, 0, 0" HorizontalAlignment="Left" MaxValue="10" MinValue="1" Increment="1"/>

                    <TextBlock Text="小题号" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Margin="0, 0, 10, 0" HorizontalAlignment="Right"></TextBlock>
                    <controls:NumericUpDown Grid.Row="1" Grid.Column="1" x:Name="NumSmall" Margin="10, 0, 0, 0" HorizontalAlignment="Left" MaxValue="10" MinValue="1" Increment="1"/>
                    
                    <TextBlock Text="题分" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Margin="0, 0, 10, 0" HorizontalAlignment="Right"></TextBlock>
                    <TextBox Grid.Row="2" Grid.Column="1" Name="txtproblem_points" Margin="10, 0, 0, 0" Width="50" Height="23" HorizontalAlignment="Left"></TextBox>
                    
                    <TextBlock Text="难度" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Margin="0, 0, 10, 0" HorizontalAlignment="Right"></TextBlock>
                    <ComboBox Grid.Row="3" Grid.Column="1" Name="cbxproblem_difficulty" Margin="10, 0, 0, 0" MinWidth="50" Height="23" HorizontalAlignment="Left"></ComboBox>
                    
                    <TextBlock Text="类型" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" Margin="0, 0, 10, 0" HorizontalAlignment="Right"></TextBlock>
                    <ComboBox Grid.Row="4" Grid.Column="1" Name="cbxproblem_type" Margin="10, 0, 0, 0" MinWidth="50" Height="23" HorizontalAlignment="Left"></ComboBox>

                    <Button Content="上一题" Grid.Row="5" Grid.Column="1" Height="23" Margin="10, 0, 0, 0" HorizontalAlignment="Left" Name="btnLastProblem" VerticalAlignment="Center" Width="75" Click="btnLastProblem_Click" />
                    <Button Content="添加" Grid.Row="5" Grid.Column="1" Height="23" Margin="100, 0, 0, 0" HorizontalAlignment="Left" Name="button1" VerticalAlignment="Center" Width="75" Click="button1_Click" />
                </Grid>
                <Grid Grid.Column="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="32" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Text="涉及知识点" Margin="10,0, 0, 0" VerticalAlignment="Center" FontSize="18"></TextBlock>
                    <ListBox Grid.Row="1" Name="lstSyllabus" SelectionMode="Multiple" MinHeight="100" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" MinWidth="150">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <CheckBox Content="{Binding syllabus_index}" IsChecked="{Binding Path=IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}, Mode=TwoWay}"></CheckBox>
                                    <TextBlock Text="{Binding syllabus_descr}"></TextBlock>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </Grid>
        </Grid>
    </Grid>
</Page>
